<!DOCTYPE html>
<html style="height: 100%;">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <title>奇葩月饼大作战</title>
        <link rel="stylesheet" type="text/css" href="../../www/Public/Web/css/web.css"/>
        <script src="../../www/Public/Web/Js/jquery-1.10.2.min.js" type="text/javascript" charset="utf-8"></script>
     </head>
     <style type="text/css">
     
     	.nr{background: url(../../www/Public/Web/Img/zqj/bj.png) center top no-repeat;background-size: cover;height: 100%;}
     	.sr{ width: 72%;margin: 0 auto;height: 100%;}
     	.sr input{width:100%;height: 28%;border: none;background: url(../../www/Public/Web/Img/zqj/01.png) center no-repeat;background-size: cover;margin-bottom: 4.5%;overflow: hidden;text-align: center;}
     	.dh{display: block;width: 50%;height:100%;margin: 0 auto;background: url(../../www/Public/Web/Img/zqj/02.png) center no-repeat;background-size: cover;margin-bottom: 4.5%;overflow: hidden;text-align: center;}
     	.tus{background: rgba(0,0,0,0.4);width: 56%;margin: 0 auto;display: none;}
     	.tus p{color: #fff;width: 75%;margin: 0 auto;text-align: center;padding: 6px 0;line-height: 20px;}
     	.yht-1{position: absolute;top: 2%;left: 7%;width: 33.2%;}
     	.yht-2{position: absolute;top: 16%;left: 38%;width: 31.2%;}
     	.yht-3{position: absolute;top: 2%;right: 2%;width: 31.2%;}
     </style>
     <body style="">
     	<div class="nr">
     		<img class="bj left" style="visibility: hidden;" width="100%" src="../../www/Public/Web/Img/zqj/bj.png"/>
     		<img class="yht-1" src="../../www/Public/Web/Img/zqj/yh.gif" alt="" />
     		<img class="yht-2" src="../../www/Public/Web/Img/zqj/yh-2.gif" alt="" />
     		<img class="yht-3" src="../../www/Public/Web/Img/zqj/yh-1.gif" alt="" />
     		<div style="position: absolute;top: 54%;left: 0;height: 25%;width: 100%;">
	     		<div class="sr">
	     			<input type="tel" name="mobile" id="mobile" value="" placeholder="请输入手机号码"/>
	     			<input type="url" name="Redeem" id="Redeem" value="" placeholder="请输入兑换码"/>
	     			<input type="url" name="Referral" id="Referral" value="" placeholder="请输入推荐码，选填项"/>
	     		</div>
     		</div>
     		<div style="position: absolute;top: 84%;left: 0;width: 100%;height: 7%;">
     			<a class="dh"></a>
     		</div>
     		<div style="position: absolute;top: 40%;left: 0;width: 100%;">
	     		<div class="tus">
	     			<p>该手机号已领取过中秋大奖，不可重复领取</p>
	     		</div>
			</div>	
     	</div>
     </body>
</html>
<script type="text/javascript">
    window.onload = function() {       
        var height = $("html").height();
        var he = $(".bj").height();
        $("body").height(height);
        $(".nr").css('min-height',he);

        var inn = $(".sr input").height();
        $(".sr input").css("font-size", inn / 2.4 + "px");
    }
    $(function(){
      $(".dh").click(function() {
          var mobile = $('#mobile').val();
          var Redeem = $('#Redeem').val();
          var Referral = $('#Referral').val();          
            $.ajax({
                url:'{:U("Special/MoonfightHandle")}',
                type:'post',
                dataType:'json',
                data:'mobile='+mobile+'&Redeem='+Redeem+'&Referral='+Referral,
                async:false,
                success:function(data){   
                    if(data.status=='false'){
                        $(".tus p").html(data.content);
                        $(".tus").show("slow");
                        setTimeout(b,3000)                                            
                        return false;
                    }else if(data.status=='true'){
                        window.location.href=data.url;
                        return false;
                    }
                }
            });
      });

      function b(){
        $(".tus").hide("slow");
      }
    });
</script>
